from django.conf.urls import url

from . import views

urlpatterns = [
    # 注册
    url(r'^register/$', views.RegisterView.as_view()),

    # 判断用户名是否重复   /usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/

    url(r'^usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$', views.UsernamecountView.as_view()),


    # 判断手机号是否重复   mobiles/(?P<mobile>1[3-9]\d{9})/count/
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobilecountView.as_view()),

    # 登录
    url(r'^login/$', views.LoginView.as_view(), name='login'),

    # 退出 logout
    url(r'^logout/$', views.LogOutView.as_view(), name='logout'),


    # 用户中心 info
    url(r'^info/$', views.UserInfoView.as_view(), name='info'),

    # 保存邮箱 email
    url(r'^emails/$', views.EmailView.as_view(), name='email'),

    # 激活邮箱  emails/verification/
    url(r'^emails/verification/$', views.EmailVerifyView.as_view(), name='verify'),


    # 展示收货地址 address
    url(r'^address/$', views.AddressView.as_view(), name='address'),

]